/*
 * space_func_test.c
 *
 *  Created on: Apr 10, 2012
 *      Author: root
 */
/*
#include	"unp.h"

char* space_remover(char* dst, char* src, size_t srclen) {

	size_t n;
	char c;
	char* start = src;
	char* end = src;
	int i = 0;

	for (n = 1; n <= srclen; n++) {
		if ((*src == ' ') || (*src == '\n')) {
			src++;
			continue;
		} else {
			while ((*src != ' ') && (*src != '\n') && (*src != 0)) {
				*dst++ = *src;
				src++;
				end = src;
				n++;
			}
			*dst = 0;
			break;
		}
	}
	return end;
}

void main() {
	char a[20];
	char b[20];
	char* c;
	memset(a, 0x00, 20);
	memset(b, 0x00, 20);
	char aa[] = "123 567 end";

	aa = space_remover(b, aa, strlen(aa));
	printf("[%s]\n", b);
	printf("[%s]\n", aa);


	memset(b, 0x00, 20);
	c = space_remover(b, c, strlen(c));
	printf("[%s]\n", b);
	printf("[%s]\n", c);

	memset(b, 0x00, 20);
	c = space_remover(b, c, strlen(c));
	printf("[%s]\n", b);
	printf("[%s]\n", c);

	memset(b, 0x00, 20);
	c = space_remover(b, c, strlen(c));
	printf("[%s]\n", b);
	printf("[%s]\n", c);


}

*/
